package com.aotain.nyx.netipstat;

import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.java.tuple.Tuple2;

import com.aotain.nyx.ipstat.IPStatTuple;


public class IPFlowStatTotalMap implements MapFunction<IPStatTuple,Tuple2<String,IPStatTuple>>{

	/**
	 *
	 */
	    
	private static final long serialVersionUID = -5200896244890093411L;

	@Override
	public Tuple2<String,IPStatTuple> map(IPStatTuple value)
			throws Exception {
		Tuple2<String,IPStatTuple> ret = new Tuple2<String,IPStatTuple>();
		IPStatTuple retTuple = new IPStatTuple();
		retTuple.setValueMap(value.getValueMap());		
		
		ret.setFields("1", retTuple);
		
		return ret;
		    
	}

}

    